<?
if(isset($_POST['salir']))
	{
	echo '
	<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Strict//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-strict.dtd">
	<html xmlns="http://www.w3.org/1999/xhtml" xml:lang="en" lang="en">
	<head>
	<title>Autos y Refacciones</title>
	<meta http-equiv="Content-Type"  content="text/html; charset=UTF-8"/>
	<SCRIPT language="Javascript" type="text/javascript">parent.document.location="perfil.php?idperfil='.$_POST['idperfil'].'&subsection=refacciones";</script>
	</head>
	<body>
	</body>
	</html>';
	}
	
$idrefaccion = $_REQUEST['idrefaccion'];
require('abrirdb.php');
$sql = mysql_query("SELECT * FROM perfil_refaccion WHERE id_refaccion = '$idrefaccion'");
$array = mysql_fetch_array($sql);
$idcliente = $array['id_cliente'];
require('abrirdb.php');
$sql2 = mysql_query("select * from perfil_global where id_cliente = '$idcliente'");
$array2 = mysql_fetch_array($sql2);
?>
<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<title>Autos Y Refacciones</title>
<link rel="stylesheet" type="text/css" href="js/jqgal/style22.css" media="screen" />
</head>
<body>
<table width="600" border="0" cellspacing="0" cellpadding="0" align="center" class="gray12">
	<tr><td width="300"><img src="refaccion/<?=$array['imagen'];?>" width="400" height="300" /></td>
		<td width="300">
		<table width="100%" border="0" cellspacing="0" cellpadding="0">
			<tr><td height="21" align="right"><strong>Pieza:</strong></td><td><?=$array['imagen'];?></td></tr>
			<tr><td height="21" align="right"><strong>Marca:</strong></td><td><?=$array['marca'];?></td></tr>
			<tr><td height="21" align="right"><strong>Ubicación:</strong></td><td><?=$array['ubicacion'];?></td></tr>
			<tr><td height="21" align="right"><strong>Precio:</strong></td><td>$<?=number_format($array['precio'],2,'.',',');?></td></tr>
			<tr><td align="right"><strong>Detalles:</strong></td><td align="justify"><?=$array['detalles'];?></td></tr>
			<tr><td width="33%">&nbsp;</td><td width="67%">&nbsp;</td></tr>
			<tr><td colspan="2" align="center"><input name="salir" type="submit" class="btngp" value="Ver Distribuidor" />
			<input name="idperfil" id="idperfil" type="hidden" value="<?=$array['id_cliente'];?>" /></a></td></tr>
		</table></td></tr>
</table>
</body>
</html>